<template>
  <n-alert title="子组件1-传值" type="success" style="margin-bottom: 20px">
    <template #icon>
      <icons name="i-info" />
    </template>
    <div style="display: flex; width: 50%">
      <n-input v-model:value="inputValue" style="margin-right: 10px" />
      <n-button type="primary" @click="emitHandle">发射</n-button>
    </div>
  </n-alert>
</template>

<script lang="ts" setup>
import { bus } from '@/utils/bus'
const inputValue = $ref('')
function emitHandle() {
  bus.$emit('test', inputValue)
}
</script>

<style scoped></style>
